
const fs = require('fs')

const Router = require('koa-router')

const router = new Router()

fs.readdirSync(__dirname).forEach(file => {
    // console.log(item);
    if (file !== 'index.js') {
        let r = require('./' + file)
        // console.log(r, 123);
        router.use(r.routes())
    }   
})



module.exports = router